﻿@model NetNote.Models.Note

@{
    ViewBag.Title = "title";
    Layout = "_Layout";
}

<h2>详情</h2>
<div class="row">
    @if (Model == null)
    {
        <form method="post" asp-action="Detail">
            <div class="from-group">
                <label asp-for="Password"></label>
                <input asp-for="Password" type="Password" placeholder="请输入密码" class="form-control" />
            </div>
            <p>
                <button type="submit" class="btn text-center">查看</button>
            </p>
        </form>
    }
    else
    {
        <h3> <a asp-action="Detail" asp-route-id="@Model.Id">@Model.Title</a></h3>
        <h5>@Model.Type.Name &emsp;<span style="font-size: 5px; color: cadetblue">@Model.Create.ToString("yyyy-MM-dd mm:ss")</span></h5>
        <div class="tab-content" id="md_@Model.Id">@Model.Content</div>
        @if (!string.IsNullOrEmpty(Model.Attachment))
        {
            <a href="@Model.Attachment">下载</a>
        }
        <hr />
    }
</div>
